a23e45
@@ -880,9 +880,6 @@
public class HConnectionManager implements HConstants {
         if (t instanceof DoNotRetryIOException) {
           throw (DoNotRetryIOException) t;
         }
-        if (t instanceof IOException) {
-          throw (IOException) t;
-        }
       }
       return null;    
     }
@@ -893,6 +890,7 @@
public class HConnectionManager implements HConstants {
       if (list.isEmpty()) {
         return;
       }
+      boolean retryOnlyOne = false;
       Collections.sort(list);
       List<BatchUpdate> tempUpdates = new ArrayList<BatchUpdate>();
       byte[] currentRegion = getRegionLocation(tableName, list.get(0).getRow(),
@@ -908,7 +906,7 @@
public class HConnectionManager implements HConstants {
           region = getRegionLocation(tableName, list.get(i + 1).getRow(), false)
               .getRegionInfo().getRegionName();
         }
-        if (!Bytes.equals(currentRegion, region) || isLastRow) {
+        if (!Bytes.equals(currentRegion, region) || isLastRow || retryOnlyOne) {
           final BatchUpdate[] updates = tempUpdates.toArray(new BatchUpdate[0]);
           int index = getRegionServerForWithoutRetries(new ServerCallable<Integer>(
               this, tableName, batchUpdate.getRow()) {
@@ -926,13 +924,10 @@
public class HConnectionManager implements HConstants {
             }
             long sleepTime = getPauseTime(tries);
             if (LOG.isDebugEnabled()) {
-              LOG.debug("Eeloading table servers because region " +
+              LOG.debug("Reloading table servers because region " +
                 "server didn't accept updates; tries=" + tries +
                 " of max=" + this.numRetries + ", waiting=" + sleepTime + "ms");
             }
-            // Basic waiting time. If many updates are flushed, tests have shown
-            // that this is barely needed but when commiting 1 update this may
-            // get retried hundreds of times.
             try {
               Thread.sleep(sleepTime);
               tries++;
@@ -940,9 +935,13 @@
public class HConnectionManager implements HConstants {
               // continue
             }
             i = i - updates.length + index;
+            retryOnlyOne = true;
             region = getRegionLocation(tableName, list.get(i + 1).getRow(),
                 true).getRegionInfo().getRegionName();
-
+            
+          }
+          else {
+            retryOnlyOne = false;
           }
           currentRegion = region;
           tempUpdates.clear();
